Use std::next rather than adding to iterator in tests
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 5 Dec 2024 07:40:00 +0000 (15:40 +0800)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 20 Dec 2024 15:26:57 +0000 (16:26 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
test/testchunkingng.cpp

index 87612fab538a18b6b5278d2cc100c93c868de771..35d08f02e0b069f142891c4f96fdb74f603e64cd 100644 (file)
@@ -178,7 +178,7 @@ private slots:
 
         // Remove the second chunk, so all further chunks will be deleted and resent
         auto firstChunk = chunkMap.first();
-        auto secondChunk = *(chunkMap.begin() + 1);
+        auto secondChunk = *(std::next(chunkMap.begin()));
         const auto chunksList = chunkMap.keys().mid(2);
         for (const auto& name : chunksList) {
             chunksToDelete.append(name);